package com.enhe.gck;

import cn.hutool.core.util.StrUtil;
import com.enhe.gck.communal.PublicMethod;
import com.enhe.gck.pojo.PickupPoint;

import java.util.HashMap;
import java.util.Map;

/**
 * mock 运费
 *
 * @author 林维家
 * @since 2025/2/19 17:00
 */
public class MockFreight {

    private static final Map<String, String> pointMap;

    static {
        pointMap = new HashMap<>();
        pointMap.put("Ciment42.5N SAC DAPLSHI", "418671195811782659");
        pointMap.put("Ciment42.5N SAC DAPKLZ", "418671352578088963");
    }

    public static PickupPoint getPickPointByProduct(String productName) {
        String pickupPointId = pointMap.get(productName);
        if (StrUtil.isBlank(pickupPointId)) {
            return null;
        }
        return PublicMethod.getInfo(CarbonBaseConstant.提货点_thd, pickupPointId, PickupPoint.class);
    }
}
